//
//  NSearchViewController.m
//  News
//
//  Created by zhangtao on 2018/10/15.
//  Copyright © 2018年 zt.td. All rights reserved.
//

#import "NSearchViewController.h"

@interface NSearchViewController ()<ShowPushMSGDelegate>
@property(nonatomic,strong)NPNavSearchView *navView;
@property(nonatomic,strong)NPSearchMaskView *searchMaskView;
@end

@implementation NSearchViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.titleView = self.navView;
    [self.view addSubview:self.searchMaskView];
    self.automaticallyAdjustsScrollViewInsets = NO;
}

-(NPNavSearchView *)navView{
    if (!_navView) {
        _navView = [[NPNavSearchView alloc]initRightButtonWithTitle:@"取消" withButtonImage:nil withController:self];
        _navView.delegate = self;
    }
    return _navView;
}

-(NPSearchMaskView *)searchMaskView{
    if (!_searchMaskView) {
        _searchMaskView = [[NPSearchMaskView alloc]initWithFrame:CGRectMake(0, navHeight, ACEWidth, ACEHeight-navHeight)];
    }
    return _searchMaskView;
}



#pragma mark ---- ShowPushMSGDelegate ----
-(void)showPushMessageTitle:(NSString *)title{

    NSLog(@"%@",title);
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
